package Test;

public class Circle {
    double r;
    public void area(){
        double pai = 3.14;
        double s = pai * r * r;

        System.out.println("面积为:"+ s);
    }


    public void area2(double pai){

        double s = pai * r * r;

        System.out.println("面积为:"+ s);
    }
    //传递一个 半径 和 pai 给我返回面积
    public  double area3(double r,double pai) {

        double s = pai * r * r;

        return s;
    }
}
